import Vue from 'vue'
import Router from 'vue-router'
import wx from 'weixin-js-sdk'
import store from '../store/index'
Vue.use(Router)
const imRouter = require('./im/index');
const allRoutes = imRouter.default.concat();
const router = new Router({
  // mode: 'history',
  routes: [
    {
      path: '/home',
      component: () => import('@/home'),
      name: 'IM',
      meta:{
          keepAlive: false,
      },
      children: allRoutes
    },
    {
      path: '/404',
      component: () => import('@/pages/404'),
      name: '404',
      meta:{
          keepAlive: false,
      }
    },
    // {
    //   path: '/static',
    //   component: () => import('@/pages/static'),
    //   name: 'static',
    //   meta:{
    //       keepAlive: false,
    //   }
    // },
    // {
    //   path: '*',
    //   redirect: {
    //       path: '/static'
    //   },
    //   meta:{
    //       keepAlive: false,
    //   }
    // },
  ]
})
router.beforeEach((to, from, next) => {
  next();
})
export default router;
